package com.dl.designmodel.observer;

/**
 * @ProjectName: mcroservices
 * @Package: com.dl.designmodel.observer
 * @ClassName: Observer2
 * @Author: 86977
 * @Description: ${description}
 * @Date: 2021/6/29 14:36
 * @Version: 1.0
 */
public class Observer2 implements Observer {
  private Subject subject;

  public Observer2(Subject subject) {
    this.subject = subject;
    subject.registerObserver(this);
  }

  @Override
  public void update(String msg) {
    System.out.println("observer2 得到 3D 号码  -->" + msg + ", 我要告诉舍友们。");

  }
}
